package com.ysx.teacher.day20210923.ch04;

public class StudentDao extends Dad {

    public  StudentDao(){
        // System.out.println("hello...");
        // 准备资源 super(); 调用父类无参的构造方法..
        super();
        System.out.println("创建1个学生对象...");
    }

    public void addStudent(){
        // 先获取1个连接
        super.getConnection();

        System.out.println("往数据库中插入1个学生对象...");

        //关闭连接
        super.closeConnection();
    }
}
